/*
Buffer.byteLength
Buffer.isBuffer()
Buffer.concat()
*/

console.log(Buffer.byteLength('test'))//4
console.log(Buffer.byteLength('测试'))//6

console.log(Buffer.isBuffer({}))//false
console.log(Buffer.isBuffer(Buffer.from([1,2,3,4])))//true

const buf1 = Buffer.from('this')
const buf2 = Buffer.from('is')
const buf3 = Buffer.from('a')
const buf4 = Buffer.from('concat')

const buf = Buffer.concat([buf1,buf2,buf3,buf4])

console.log(buf)//<Buffer 74 68 69 73 69 73 61 63 6f 6e 63 61 74>